package com.tzbank.poc.serviceimpl;

import com.tzbank.poc.dao.AccountBalanceMapper;
import com.tzbank.poc.model.AccountBalance;
import com.tzbank.poc.model.AccountBalanceKey;
import com.tzbank.poc.service.AccountBalanceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author li_zheng2
 * Created by Administrator on 2019/1/23 0023.
 */
@Service(value = "accountBalanceService")
public class AccountBalanceServiceImpl implements AccountBalanceService {

    @Autowired
    private AccountBalanceMapper accountBalanceMapper;

    @Override
    public AccountBalance queryAccountBalance(AccountBalanceKey accountBalanceKey) {
        return accountBalanceMapper.selectByPrimaryKey(accountBalanceKey);
    }

    @Override
    public int updateBalance(AccountBalance accountBalance) {
        return accountBalanceMapper.updateByPrimaryKeySelective(accountBalance);
    }
}
